﻿@model FCNS.ERP.Models.ErpSeatPlan

@{
    ViewBag.Title = "枱号预定-新增";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>
<script src="~/WebExtend/My97DatePicker/WdatePicker.js"></script>  
@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal"> 
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Tel, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Tel, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Tel, "", new { @class = "text-danger" })
            </div>
        </div>
         
        <div class="form-group">
            @Html.LabelFor(model => model.NumberOfPeople, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.NumberOfPeople, new { htmlAttributes = new { @class = "form-control" ,@min = "0" } })
                @Html.ValidationMessageFor(model => model.NumberOfPeople, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.SeatId,   htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("SeatId", ViewData["Seat"] as SelectList, htmlAttributes: new { @class = "form-control" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.DateTimeStart, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.DateTimeStart, new { htmlAttributes = new { @class = "form-control" , @onClick = "WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" } })
                @Html.ValidationMessageFor(model => model.DateTimeStart, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.SalesmanId,  htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("SalesmanId", ViewData["User"] as SelectList, htmlAttributes: new { @class = "form-control" })
            </div>
        </div>
         

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="新增" class="btn btn-default" />
            </div>
        </div>
    </div>
}

    <div>
        <a class="backToListImg" href="/Food/SeatPlan">返回</a>
    </div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
